﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SuperStore.Models;

namespace SuperStore.Controllers
{
    public class SuperStoreController : Controller
    {
        public string MemberID
        {
            get
            {
                if (Request.Cookies["MemberID"] != null)
                {
                    return Request.Cookies.Get("MemberID").Value;
                }
                else
                {
                    return string.Empty;
                }
            }
        }

        public bool ValidMemberID
        {
            get
            {
                if (string.IsNullOrWhiteSpace(this.MemberID))
                {
                    return false;
                }

                return Members.ValidMemberID(this.MemberID);
            }
        }
    }
}